Add additional data in voice broadcast events #7397
Conversation
| @@ -98,7 +100,10 @@ class StartVoiceBroadcastUseCase @Inject constructor( | |||
| attachment = audioType.toContentAttachmentData(isVoiceMessage = true), | |||
| compressBeforeSending = false, | |||
| roomIds = emptySet(), | |||
There was a problem hiding this comment.
Is it ok to have roomIds empty here?
There was a problem hiding this comment.
Yes, it is necessary only for sending media to several rooms, plus the current one. So in this case it is fine. see 06ba478#diff-3bf6c59da8f4c1cf912366c300a0b7f3a5e6696795a5667db6cb9bf5823fd7a5R55
| text: CharSequence, | ||
| msgType: String = MessageType.MSGTYPE_TEXT, | ||
| autoMarkdown: Boolean = false, | ||
| additionalContent: Content? = null, |
There was a problem hiding this comment.
It's a bit weird to have this available in all methods but I guess its acceptable.
There was a problem hiding this comment.
Yes, I was not sure but internally we thought that the sdk should allow adding custom fields for any event content following the Matrix specification. So, I added this field for each entry.
| "Voice Broadcast Part ($sequence).${voiceMessageFile.extension}" | ||
| ) | ||
| val audioType = outputFileUri.toMultiPickerAudioType(context) ?: return | ||
| // TODO put sequence in event content |
|
Just did two small fixes before merging |
|
Can you look at the failing tests? |
f8261c1 to
90803be
Compare
894c3e8 to
0781ee8
Compare
|
SonarCloud Quality Gate failed. |








Type of change
Content
Add
io.element.voice_broadcast_chunkin voice message contentAdd
device_idinio.element.voice_broadcast_infostate eventAdd entries in matrix-sdk to add additional content fields to the events
Motivation and context
Continue #7127 and follow the "specification" defined in element-hq/element-meta#632
Screenshots / GIFs
Tests
Tested devices
Checklist